package com.zy.stock.autosell;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import java.util.Objects;

public class GidDto implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     *
     */
    private Long id;
    /**
     *
     */
    private String stockNo;
    /**
     * 股票名称
     */
    private String name;
    /**
     * 今日开盘价
     */
    private BigDecimal openPrice;
    /**
     * 昨日收盘价
     */
    private BigDecimal closePrice;
    /**
     * 当前价格
     */
    private BigDecimal nowPrice;
    /**
     * 今日最高价
     */
    private BigDecimal todayMax;
    /**
     * 今日最低价
     */
    private BigDecimal todayMin;
    /**
     * 竞买价
     */
    private BigDecimal competitivePri;
    /**
     * 竞卖价
     */
    private BigDecimal reservePri;
    /**
     * 成交量(沪深为股，港股为手)
     */
    private BigDecimal tradeNum;
    /**
     * 成交金额（金额，元）
     */
    private BigDecimal tradeAmount;


    /**
     *外盘
     */
    private BigDecimal outerDisc;
    /**
     *内盘
     */
    private BigDecimal invol;

    /**
     * 均价
     */
    private BigDecimal avgPrice;

    /**
     * 买一数量（股）
     */
    private BigDecimal buy1N;
    /**
     * 买一报价（金额，元）
     */
    private BigDecimal buy1M;
    /**
     *
     */
    private BigDecimal buy2N;
    /**
     *
     */
    private BigDecimal buy2M;
    /**
     *
     */
    private BigDecimal buy3N;
    /**
     *
     */
    private BigDecimal buy3M;
    /**
     *
     */
    private BigDecimal buy4N;
    /**
     *
     */
    private BigDecimal buy4M;
    /**
     *
     */
    private BigDecimal buy5N;
    /**
     *
     */
    private BigDecimal buy5M;
    /**
     * 卖一
     */
    private BigDecimal sell1N;
    /**
     * 卖一报价
     */
    private BigDecimal sell1M;
    /**
     *
     */
    private BigDecimal sell2N;
    /**
     *
     */
    private BigDecimal sell2M;
    /**
     *
     */
    private BigDecimal sell3N;
    /**
     *
     */
    private BigDecimal sell3M;
    /**
     *
     */
    private BigDecimal sell4N;
    /**
     *
     */
    private BigDecimal sell4M;
    /**
     *
     */
    private BigDecimal sell5N;
    /**
     *
     */
    private BigDecimal sell5M;
    /**
     *
     */
    private String date;
    /**
     *
     */
    private Date datetime;
    private Long timeStamp;
    /**
     * 涨跌金额
     */
    private BigDecimal diffMoney;
    /**
     * 涨跌幅度
     */
    private BigDecimal diffRate;
    /**
     * 振幅
     */
    private BigDecimal swing;
    /**
     * 换手率
     */
    private BigDecimal turnover;
    /**
     * 市盈率(TTM,动态)
     */
    private BigDecimal pe;

    /**
     * 静态市盈率
     */
    private BigDecimal jpe;

    /**
     * ttm市盈率
     */
    private BigDecimal ttm;

    /**
     * 市净率
     */
    private BigDecimal pb;
    /**
     * 涨停价
     */
    private BigDecimal highLimit;
    /**
     * 跌停价
     */
    private BigDecimal downLimit;
    /**
     * 总市值，亿元
     */
    private BigDecimal allValue;
    /**
     * 流通市值，亿元
     */
    private BigDecimal circulationValue;
    /**
     * 总股本，万股
     */
    private BigDecimal totalcapital;
    /**
     * 流通股本，万股
     */
    private BigDecimal currcapital;
    /**
     * 52周最大价格
     */
    private BigDecimal max52;
    /**
     * 52周最低价格
     */
    private BigDecimal min52;
    /**
     * 委比（%）
     */
    private BigDecimal appointRate;
    /**
     * 委差（手）
     */
    private BigDecimal appointDiff;
    /**
     * 1为正常状态，非1为停牌
     */
    private String state;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getStockNo() {
        return stockNo;
    }

    public void setStockNo(String stockNo) {
        this.stockNo = stockNo == null ? null : stockNo.trim();
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name == null ? null : name.trim();
    }

    public BigDecimal getOpenPrice() {
        return openPrice;
    }

    public void setOpenPrice(BigDecimal openPrice) {
        this.openPrice = openPrice;
    }

    public BigDecimal getClosePrice() {
        return closePrice;
    }

    public void setClosePrice(BigDecimal closePrice) {
        this.closePrice = closePrice;
    }

    public BigDecimal getNowPrice() {
        return nowPrice;
    }

    public void setNowPrice(BigDecimal nowPrice) {
        this.nowPrice = nowPrice;
    }

    public BigDecimal getTodayMax() {
        return todayMax;
    }

    public void setTodayMax(BigDecimal todayMax) {
        this.todayMax = todayMax;
    }

    public BigDecimal getTodayMin() {
        return todayMin;
    }

    public void setTodayMin(BigDecimal todayMin) {
        this.todayMin = todayMin;
    }

    public BigDecimal getCompetitivePri() {
        return competitivePri;
    }

    public void setCompetitivePri(BigDecimal competitivePri) {
        this.competitivePri = competitivePri;
    }

    public BigDecimal getReservePri() {
        return reservePri;
    }

    public void setReservePri(BigDecimal reservePri) {
        this.reservePri = reservePri;
    }

    public BigDecimal getTradeNum() {
        return tradeNum;
    }

    public void setTradeNum(BigDecimal tradeNum) {
        this.tradeNum = tradeNum;
    }

    public BigDecimal getTradeAmount() {
        return tradeAmount;
    }

    public void setTradeAmount(BigDecimal tradeAmount) {
        this.tradeAmount = tradeAmount;
    }

    public BigDecimal getBuy1N() {
        return buy1N;
    }

    public void setBuy1N(BigDecimal buy1N) {
        this.buy1N = buy1N;
    }

    public BigDecimal getBuy1M() {
        return buy1M;
    }

    public void setBuy1M(BigDecimal buy1M) {
        this.buy1M = buy1M;
    }

    public BigDecimal getBuy2N() {
        return buy2N;
    }

    public void setBuy2N(BigDecimal buy2N) {
        this.buy2N = buy2N;
    }

    public BigDecimal getBuy2M() {
        return buy2M;
    }

    public void setBuy2M(BigDecimal buy2M) {
        this.buy2M = buy2M;
    }

    public BigDecimal getBuy3N() {
        return buy3N;
    }

    public void setBuy3N(BigDecimal buy3N) {
        this.buy3N = buy3N;
    }

    public BigDecimal getBuy3M() {
        return buy3M;
    }

    public void setBuy3M(BigDecimal buy3M) {
        this.buy3M = buy3M;
    }

    public BigDecimal getBuy4N() {
        return buy4N;
    }

    public void setBuy4N(BigDecimal buy4N) {
        this.buy4N = buy4N;
    }

    public BigDecimal getBuy4M() {
        return buy4M;
    }

    public void setBuy4M(BigDecimal buy4M) {
        this.buy4M = buy4M;
    }

    public BigDecimal getBuy5N() {
        return buy5N;
    }

    public void setBuy5N(BigDecimal buy5N) {
        this.buy5N = buy5N;
    }

    public BigDecimal getBuy5M() {
        return buy5M;
    }

    public void setBuy5M(BigDecimal buy5M) {
        this.buy5M = buy5M;
    }

    public BigDecimal getSell1N() {
        return sell1N;
    }

    public void setSell1N(BigDecimal sell1N) {
        this.sell1N = sell1N;
    }

    public BigDecimal getSell1M() {
        return sell1M;
    }

    public void setSell1M(BigDecimal sell1M) {
        this.sell1M = sell1M;
    }

    public BigDecimal getSell2N() {
        return sell2N;
    }

    public void setSell2N(BigDecimal sell2N) {
        this.sell2N = sell2N;
    }

    public BigDecimal getSell2M() {
        return sell2M;
    }

    public void setSell2M(BigDecimal sell2M) {
        this.sell2M = sell2M;
    }

    public BigDecimal getSell3N() {
        return sell3N;
    }

    public void setSell3N(BigDecimal sell3N) {
        this.sell3N = sell3N;
    }

    public BigDecimal getSell3M() {
        return sell3M;
    }

    public void setSell3M(BigDecimal sell3M) {
        this.sell3M = sell3M;
    }

    public BigDecimal getSell4N() {
        return sell4N;
    }

    public void setSell4N(BigDecimal sell4N) {
        this.sell4N = sell4N;
    }

    public BigDecimal getSell4M() {
        return sell4M;
    }

    public void setSell4M(BigDecimal sell4M) {
        this.sell4M = sell4M;
    }

    public BigDecimal getSell5N() {
        return sell5N;
    }

    public void setSell5N(BigDecimal sell5N) {
        this.sell5N = sell5N;
    }

    public BigDecimal getSell5M() {
        return sell5M;
    }

    public void setSell5M(BigDecimal sell5M) {
        this.sell5M = sell5M;
    }

    public String getDate() {
        return date;
    }

    public void setDate(String date) {
        this.date = date == null ? null : date.trim();
    }

    public Date getDatetime() {
        return datetime;
    }

    public void setDatetime(Date datetime) {
        this.datetime = datetime;
    }

    public Long getTimeStamp() {
        return timeStamp;
    }

    public void setTimeStamp(Long timeStamp) {
        this.timeStamp = timeStamp;
    }

    public BigDecimal getDiffMoney() {
        return diffMoney;
    }

    public void setDiffMoney(BigDecimal diffMoney) {
        this.diffMoney = diffMoney;
    }

    public BigDecimal getDiffRate() {
        return diffRate;
    }

    public void setDiffRate(BigDecimal diffRate) {
        this.diffRate = diffRate;
    }

    public BigDecimal getSwing() {
        return swing;
    }

    public void setSwing(BigDecimal swing) {
        this.swing = swing;
    }

    public BigDecimal getTurnover() {
        return turnover;
    }

    public void setTurnover(BigDecimal turnover) {
        this.turnover = turnover;
    }

    public BigDecimal getPe() {
        return pe;
    }

    public void setPe(BigDecimal pe) {
        this.pe = pe;
    }

    public BigDecimal getPb() {
        return pb;
    }

    public void setPb(BigDecimal pb) {
        this.pb = pb;
    }

    public BigDecimal getHighLimit() {
        return highLimit;
    }

    public void setHighLimit(BigDecimal highLimit) {
        this.highLimit = highLimit;
    }

    public BigDecimal getDownLimit() {
        return downLimit;
    }

    public void setDownLimit(BigDecimal downLimit) {
        this.downLimit = downLimit;
    }

    public BigDecimal getAllValue() {
        return allValue;
    }

    public void setAllValue(BigDecimal allValue) {
        this.allValue = allValue;
    }

    public BigDecimal getCirculationValue() {
        return circulationValue;
    }

    public void setCirculationValue(BigDecimal circulationValue) {
        this.circulationValue = circulationValue;
    }

    public BigDecimal getTotalcapital() {
        return totalcapital;
    }

    public void setTotalcapital(BigDecimal totalcapital) {
        this.totalcapital = totalcapital;
    }

    public BigDecimal getCurrcapital() {
        return currcapital;
    }

    public void setCurrcapital(BigDecimal currcapital) {
        this.currcapital = currcapital;
    }

    public BigDecimal getMax52() {
        return max52;
    }

    public void setMax52(BigDecimal max52) {
        this.max52 = max52;
    }

    public BigDecimal getMin52() {
        return min52;
    }

    public void setMin52(BigDecimal min52) {
        this.min52 = min52;
    }

    public BigDecimal getAppointRate() {
        return appointRate;
    }

    public void setAppointRate(BigDecimal appointRate) {
        this.appointRate = appointRate;
    }

    public BigDecimal getAppointDiff() {
        return appointDiff;
    }

    public void setAppointDiff(BigDecimal appointDiff) {
        this.appointDiff = appointDiff;
    }

    public String getState() {
        return state;
    }

    public void setState(String state) {
        this.state = state == null ? null : state.trim();
    }

    public BigDecimal getJpe() {
        return jpe;
    }

    public void setJpe(BigDecimal jpe) {
        this.jpe = jpe;
    }

    public BigDecimal getTtm() {
        return ttm;
    }

    public void setTtm(BigDecimal ttm) {
        this.ttm = ttm;
    }

    public BigDecimal getOuterDisc() {
        return outerDisc;
    }

    public void setOuterDisc(BigDecimal outerDisc) {
        this.outerDisc = outerDisc;
    }

    public BigDecimal getInvol() {
        return invol;
    }

    public void setInvol(BigDecimal invol) {
        this.invol = invol;
    }

    public BigDecimal getAvgPrice() {
        return avgPrice;
    }

    public void setAvgPrice(BigDecimal avgPrice) {
        this.avgPrice = avgPrice;
    }

    @Override
    public String toString() {
        return "GidDto{" +
                "stockNo='" + stockNo + '\'' +
                ", name='" + name + '\'' +
                ", nowPrice=" + (nowPrice.compareTo(BigDecimal.ZERO) == 0 ? buy1M : nowPrice) +
                ", datetime=" + datetime +
                '}';
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        GidDto gidDto = (GidDto) o;
        return Objects.equals(stockNo, gidDto.stockNo) &&
                Objects.equals(datetime, gidDto.datetime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(stockNo, datetime);
    }

}
